<template>
  <div>
    <div class="item-content">
      {{ data.content }}
    </div>
    <item-audio
      :url="data.ossUrl"
      :username="data.userName"
      :id="data.id"
      v-if="data.type === 3"
    ></item-audio>
    <item-video
      :url="data.ossUrl"
      :poster="data.ossImgUrl"
      :id="data.id"
      v-if="data.type === 2"
    ></item-video>
    <item-photos v-if="data.type === 1" :photos="data.data"></item-photos>
  </div>
</template>
<script>
import itemAudio from "./audio.vue";
import itemVideo from "./video.vue";
import itemPhotos from "./photos.vue";
export default {
  props: ["data"],
  data() {
    return {};
  },
  components: {
    itemAudio,
    itemVideo,
    itemPhotos,
  },
};
</script>
